package com.wsoft.system.manager;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wsoft.system.entity.SysMenuEntity;
import com.wsoft.system.mapper.SysMenuMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Zhang gukai
 * @Date 2024/9/2 18:47
 */
@Slf4j
@Service
public class MenuManager extends ServiceImpl<SysMenuMapper, SysMenuEntity> {
    public List<SysMenuEntity> getMenuByTitle(String title){
        QueryWrapper<SysMenuEntity> query = new QueryWrapper<>();
        query.lambda().eq(SysMenuEntity::getTitle,title);
        return list(query);
    }
}
